<?php
class recuperacionForm extends sfForm
{
  public function configure()
  {
    //parent::configure();
 
    $this->setWidgets(array(
      'email'        => new sfWidgetFormInputText(),
	 // 'captcha'	  => new sfWidgetFormReCaptcha(array('public_key' => 'RECAPTCHA_PUBLIC_KEY')),
    ));    
 
    $this->setValidators(array(
      'email'        => new sfValidatorEmail(array('required'=>true), array('required'=>'El email es obligatorio')),
      //'captcha'  => new sfValidatorString(array('required'=>true), array('required'=>'Escribe tu contraseña')),
    ));
    
    //$this->widgetSchema->setHelp('email', 'Your contact email address');
    $decorator = new myWidgetFormSchemaFormatterCustom($this->getWidgetSchema());
  	$this->widgetSchema->addFormFormatter('custom', $decorator);
  	$this->widgetSchema->setFormFormatterName('custom');
         
 
    $this->widgetSchema->setNameFormat('recuperacion[%s]');
    $this->widgetSchema->setFormFormatterName('table');
    
        parent::configure(); 
        $this->disableLocalCSRFProtection(); 
  }
 
}
